const path = require('path')
module.exports = {
    publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
    // 这一步配置将css强行内联，否则发布后的组件在使用时不会携带css
    css:{
      extract: false
    },
    assetsDir: 'src',
    publicPath: '/dist/',
    filenameHashing: false,
    pages: {
        index: {
            entry: './src/index.js',
            output: {
                path: path.resolve(__dirname, './dist'),
                filename: 'im-input-box.js',
                library: 'imInputBox',
                libraryTarget: 'umd',
                umdNamedDefine: true
            }
        }
    }
  }